package com.thiswhyme.log.core;

import lombok.AllArgsConstructor;
import org.springframework.context.ApplicationContext;

/**
 * @Description: 日志事件publisher
 * Created by thiswhyme on 2020/10/11
 */
@AllArgsConstructor
public class LogPublisher {

    private final ApplicationContext applicationContext;

    public void publish(OperationLog msg){
        applicationContext.publishEvent(new LogEvent(this, msg));
    }
}